<template>
  <div class="container_index">
    <navItem :text="text"></navItem>
    <div class="dataBox">
      <ul class="data_list">
        <li class="data_li">
          99999.99
          <div class="span">本月业绩</div>
        </li>
        <li class="data_li">
          879989.99
          <div class="span">累计业绩</div>
        </li>
        <img
          :src="isHidden?imgurl+'my_partner/eye.png':imgurl+'my_partner/eye1.png'"
          alt v-if="imgurl"
          class="safeIcon" @click="sefeBtn"
        />
      </ul>
    </div>

    

    <ul class="bt_list">
      <li class="bt_li" @click="toDetail(1)">
        <img
          class="icon" 
          src="https://img.ameimeika.com/h5_images/my_partner/hexiao.png"
          alt
        />
        <br />项目核销
      </li>
      <li class="bt_li" @click="toDetail(2)">
        <img
          class="icon"
          src="https://img.ameimeika.com/h5_images/my_partner/baodan.png"
          alt
        />
        <br />成交报单
      </li>
    </ul>
    <img
      src="https://img.ameimeika.com/h5_images/my_partner/banner.jpg"
      alt
      class="bannerimg"
    />
  </div>
</template>

<script>
import navItem from "@/components/nav";
import common from "@/assets/js/common.js"

export default {
  data() {
    return {
      text: "超级新零售小助手",
      imgurl:common.image_url,
      isHidden:false
    };
  },

  components: {
    navItem
  },
  onLoad() {},

  methods: {
    sefeBtn(){
      this.isHidden = !this.isHidden
      console.log(this.isHidden)
    },
    toDetail(e) {
      if (e == 1) {
        wx.navigateTo({
          url: `/pages/hexiao/main`
        });
      }else{
         wx.navigateTo({
          url: `/pages/declaration/main`
        });
      }

    }
  },

  created() {
    // let app = getApp()
  }
};
</script>

<style scoped lang="less">
.container_index {
  width: 100%;
  text-align: center;
  background: #F5F6F7;
  box-sizing: border-box;
  overflow: hidden;
}
/* 数据模板样式 */
.dataBox {
  width: 100%;
 background: url("https://mmkapp.oss-cn-beijing.aliyuncs.com/h5_images/my_partner/index_bg.png") no-repeat;
  background-size: 100% 60%;
  box-sizing: border-box;
  padding: 32px 12px 0;
}
.data_list {
  width: 100%;
  height: 205px;
  background: url("  https://mmkapp.oss-cn-beijing.aliyuncs.com/h5_images/my_partner/index_bg2.png") no-repeat;
  background-size: 100% 100%;
  font-size: 26px;
  color: #1d2023;
  border-radius: 8px;
  box-shadow: 0px 8px 14px 0px rgba(14, 26, 128, 0.03);
  text-align: left;
  box-sizing: border-box;
  padding-top: 21px;
  padding-left: 14px;
  margin-bottom: 12px;
  position: relative;
}
.data_li {
  width: 61.55%;
  color: rgba(29, 32, 35, 1);
}
.data_li:nth-of-type(1) {
  padding-bottom: 18px;
  border-bottom: 1px solid #eeeeee;
}
.data_li:nth-of-type(2) {
  padding-top: 18px;
}
.span {
  font-size: 15px;
  margin-top: 8px;
}
.safeIcon {
  width: 24px;
  height: 15px;
  position: absolute;
  top: 32px;
  right: 20px;
}
/* 核销、报单样式 */
.bt_list {
  width: 100%;
  display: flex;
  padding: 0 12px;
  color: #1D2023;
  font-size: 15px;
}
.bt_li {
  width: 45.06%;
  height: 96px;
  justify-content: space-between;
  background: #fff;
  margin-right: 12px;
  box-sizing: border-box;
  padding-top: 18px;
  border-radius: 8px;
}
.icon {
  width: 40px;
  height: 40px;
}
/* banner */
.bannerimg {
  width: 93.6%;
  height: 105px;
  border-radius: 8px;
  margin-top: 12px;
}
</style>
